<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="aa" uri="http://ajaxanywhere.sourceforge.net/" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><fmt:message key="passengerNotifyInfoList.title"/></title> 
<script src="<c:url value='/scripts/common.js'/>"></script> 
<script src="<c:url value='/scripts/ajax/aa.js'/>"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/layout.css'/>" />
</head>

<body leftmargin="0" topmargin="0">
<html:form action="passengerNotifyInfo">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="44" class="home-content-title"><img src="images/home_ico_listTitle.gif" width="22" height="20" align="absmiddle">航班旅客通知记录</td>
  </tr>
   <tr> 
    <td height="25" class="home-table-tool-content02">
        <%--<input type="button" 
                class="home-table-inputbox"
        		onClick="window.open('./passengerNotifyInfo.html?method=edit&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>',null,'top=200,height=400,width=600,status=no,toolbar=no,menubar=no,location=no')"
        		value="<fmt:message key="button.add"/>"/>
         <input type="button" 
                class="home-table-inputbox"
        		onclick="doDelete('selected_id')"
        		value="<fmt:message key="button.delete"/>"/>	--%> 
         <%--input type="button" 
                class="home-table-inputbox"
        		onclick="window.close();"
        		value="返回"
        	 <logic:messagesNotPresent>
		<c:if test="${'sendFlow' eq param.method || '2' eq param.type}">
		  	disabled
		  </c:if>	
		 </logic:messagesNotPresent>  	        		
		/ --%>		
         <input type="button" 
                class="home-table-inputbox"
        		onclick="batchEdit('selected_id')"
        		value="<fmt:message key="button.batchEdit"/>" 
        		 <logic:messagesNotPresent>
		<c:if test="${'sendFlow' eq param.method || '2' eq param.type}">
		  	disabled
		  </c:if>	
		 </logic:messagesNotPresent>  		
		/>	
		<input type="button" class="home-table-inputbox" value="保存并提交" onclick="sendNotifyFlow()" 
		 <logic:messagesNotPresent>
		<c:if test="${'sendFlow' eq param.method || '2' eq param.type}">
		  	disabled
		  </c:if>	
		 </logic:messagesNotPresent>  
		/> 		 
    </td>
  </tr>

  <tr>
    <td valign="top"> 
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="home-table-topline"> </td>
        </tr>
        <tr> 
          <td class="home-table-leftline">
		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-tool-content">
				 <%--<input name="Submit1" type="button" class="home-inputBtn" onClick="history.back()" value="保存">
                  <input name="Submit3" type="button" class="home-inputBtn" onClick="MM_goToURL('window','#');return document.MM_returnValue" value="重写"> 
                  <input name="Submit32" type="button" class="home-inputBtn" onClick="history.back()" value="取消">--%>
                  </td>
              </tr>
              <tr>
                <td align="center" valign="top">&nbsp;</td>
              </tr>
              <tr> 
                <td valign="top" class="home-edittable-space"> 
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
               <tr> 
                      <td><table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">
                          <tr> 
                            <td width="20%" class="home-subtable-view-tdstyle-right">发布时间：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightAdjustInfo.publishTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                            <td width="20%" class="home-subtable-view-tdstyle-right">航班号：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.flightNum}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">始发站：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.dan}"/></td>
                            <td class="home-subtable-view-tdstyle-right">终点站：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.aan}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">计划起飞日期/时间：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightAdjustInfo.std}" pattern="yyyy-MM-dd HH:mm"/></td>
                            <td class="home-subtable-view-tdstyle-right">调整后起飞日期/时间：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightAdjustInfo.currentTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">调整类别：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:if test="${flightAdjustInfo.adjustType==1}">临时性调整</c:if>
                            <c:if test="${flightAdjustInfo.adjustType==2}">临时性取消</c:if>
                            <c:if test="${flightAdjustInfo.adjustType==3}">计划性调整</c:if>
                            <c:if test="${flightAdjustInfo.adjustType==4}">计划性取消</c:if>
                            </td>
                            <td class="home-subtable-view-tdstyle-right">调整原因：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.reasonInName}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">公务舱人数：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.passagerNum}"/></td>
                            <td class="home-subtable-view-tdstyle-right">经济舱人数：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.econNum}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">总人数：</td>
                            <td colspan=3 class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.passagerTotal}"/></td>
						  </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">保障预案：</td>
                            <td colspan=3 class="home-subtable-view-tdstyle-left">
				当航班延误超过2小时，配餐需为受影响旅客准备餐食.航班延误超过4小时，特殊航班保障小组在调度室的指示下带领旅客到指定酒店休息.并记录相关情况
			    </td>
			  </tr>
                        </table></td>
                    </tr>

                    <tr> 
                      <td>&nbsp;</td>
                    </tr>
                    <tr> 
                      <td class="home-table-tool-content">通知记录</td>
                    </tr>
					
					<tr> 
						<td valign="top" class="home-tab-line">
					<aa:zone name="NotifyZone">		 
					<table width="100%" border="0" cellpadding="2" cellspacing="0" class="list_bordercolor">
                    
                     <tr> 
                       <td colspan="14" class="home-table-tool-content02"><sasis:page items="${passengerNotifyInfoList}"/></td>
                     </tr>
                    
                    <tr> 
                      <td width="6%" class="home-list-title"><div align="center"> 
                          <input type="checkbox" name="checkbox" value="checkbox" onclick="chooseAll(this)" />
                        </div></td>
                      
                      <td  width="9%" class="home-list-title">&nbsp;旅客姓名</td>
                      <td  width="6%" class="home-list-title">&nbsp;票号</td>
                      <td  width="6%" class="home-list-title">&nbsp;PNR</td>
                      <td  width="8%" class="home-list-title">&nbsp;联系电话</td>
                      
                      <td  width="10%" class="home-list-title">&nbsp;是否已通知</td>
                      <td  width="10%" class="home-list-title">&nbsp;未通知原因</td>
                      <td  width="8%" class="home-list-title">&nbsp;是否中转</td>
                      <td  width="10%" class="home-list-title">&nbsp;中转航班号</td>
                      <td  width="15%" class="home-list-title">&nbsp;中转航班时刻</td>
		      <td class="home-list-title" width="50">&nbsp;<fmt:message key="button.edit"/></td>		   				 
		      <td class="home-list-title"  width="50">&nbsp;<fmt:message key="button.view"/></td>	
                    </tr>
                    <c:forEach var="results" items="${passengerNotifyInfoList}" varStatus="status">
                    <tr>
                      <td class="home-list-content"><div align="center"> 
                        <input type="checkbox" name="selected_id" value="<c:out value='${results.id}'/>,<c:out value='${results.pi_id}'/>" />
                      </td>
                      <%--<td class="home-list-content">&nbsp;<c:out value="${results.id}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.pi_id}"/></td>--%>
                      
                      <td class="home-list-content">&nbsp;<c:out value="${results.chineseName}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.etNumber}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.icsNumber}"/></td>
                      <td class="home-list-content" style="text-align:left">&nbsp;<c:out value="${results.mobile}"/></td>
                      
                      <td class="home-list-content">&nbsp;
                         <c:if test="${results.notifyFlag==null}"></c:if>
                         <c:if test="${results.notifyFlag==0}">否</c:if>
                         <c:if test="${results.notifyFlag==1}">是</c:if>
                      </td>
                      <td class="home-list-content" style="word-break:break-all">&nbsp;<c:out value="${results.reason}"/></td>
                      
                      
                      <td class="home-list-content">&nbsp;
                         <c:if test="${results.transferFlag==null}"></c:if>
                         <c:if test="${results.transferFlag==0}">否</c:if>
                         <c:if test="${results.transferFlag==1}">是</c:if>
                      </td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.transferFlightNum}"/></td>
                      <td class="home-list-content">&nbsp;<fmt:formatDate value="${results.transferFlightDate}" pattern="yyyy-MM-dd HH:mm"/></td>
		    <td class="home-list-content" width="50">&nbsp;
		    	<img src="./images/edit.gif" width="14" height="14" style="cursor:hand"  alt="<fmt:message key="button.edit"/>" onClick="window.open('./passengerNotifyInfo.html?method=edit&pi_id=<c:out value="${results.pi_id}"/>&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>',null,'top=200,left=140,height=350,width=700,status=no,toolbar=no,scrollbars=yes,menubar=no,location=no')">&nbsp;
		    </td>
		    <td class="home-list-content" width="50">&nbsp;
		    	<img src="./images/view.gif" width="14" height="14" style="cursor:hand"  alt="<fmt:message key="button.view"/>"  onClick="MM_openBrWindow('./passengerNotifyInfo.html?method=view&pi_id=<c:out value="${results.pi_id}"/>','','width=400,height=255')" >&nbsp;
		    </td>
                    </tr>
		</c:forEach> 
		
                  </table>
             </aa:zone>     
                </td>
              </tr>
            </table></td>
        </tr>
       
      </table>
	  
	  </td>
  </tr>

   <tr> 
          
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-bottom-left">&nbsp;</td>
                <td class="home-table-bottom-bg">&nbsp;</td>
                <td class="home-table-bottom-right">&nbsp;</td>
              </tr>
            </table>
        </tr>
</table>
</html:form>
</body>
<script>
//written by kellen 07-04-19
function doDelete(chkName){  
		var selected = new Array(); 
		var val = "";	  
		   for (var i=0;i < document.forms[0].elements.length; i++){
				var e = document.forms[0].elements[i];  
				if (e.name==chkName){
					var chk = document.forms[0].elements[i];
					if(chk.checked){
						var bb = e.value; 
					    	selected.push(bb);
					    	break;
					} 
				}	 
			}	 
 		if(0!=selected.length){
 			if(confirm("<fmt:message key="common.confirm.message"/>")){  
				document.forms[0].method="post";
				document.forms[0].action="./passengerNotifyInfo.html?method=delete";
				document.forms[0].submit();
				
			}else return;	  			
		}else{
			alert("<fmt:message key="common.delete.message"/>");
		}	 
	}
	
//added by liuhao 2008-8-21	
function batchEdit(chkName){ 
        var f_a_ID=""; 
		var selected = new Array(); 
		var val = "";	  
		   for (var i=0;i < document.forms[0].elements.length; i++){
				var e = document.forms[0].elements[i];  
				if (e.name==chkName){
					var chk = document.forms[0].elements[i];
					if(chk.checked){
						var bb = e.value; 
					    	selected.push(bb);
					    	break;
					} 
				}	 
			}	 
 		if(0!=selected.length){
 		   
 			//if(confirm("<fmt:message key="common.confirm.batchEdit"/>")){
 			    f_a_ID='<c:out value="${param.flightAdjustInfoId}"/>';
 			    if(f_a_ID==null){
 			     f_a_ID='<c:out value="${flightAdjustInfoId}"/>';
 			    }
				document.forms[0].method="post";
				document.forms[0].action="./passengerNotifyInfo.html?method=batchEdit&workItemId=<c:out value="${param.workItemId}"/>&processinstid=<c:out value="${param.processinstid}"/>&appId=<c:out value="${param.appId}"/>&flightInfoId=<c:out value="${param.flightInfoId}"/>&flightAdjustInfoId="+f_a_ID;
				document.forms[0].submit();
			//}else return;	  			
		}else{
			alert("<fmt:message key="common.batchEdit.message"/>");
		}	 
	}
 function saveNotify(){ 
	ajaxAnywhere.getZonesToReload = function() {
    return "NotifyZone";
	}
	ajaxAnywhere.getAJAX('passengerNotifyInfo.html?flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>','NotifyZone')
     //ajaxAnywhere.submitAJAX(); 
}		

//保存工作流表单 add by kellen
function sendNotifyFlow(){
  document.forms[0].method="post";
  document.forms[0].action="passengerNotifyInfo.html?method=sendFlow&workItemId=<c:out value="${passengerNotifyInfoForm.workItemId}"/>&processinstid=<c:out value="${passengerNotifyInfoForm.processinstid}"/>&appId=<c:out value="${passengerNotifyInfoForm.appId}"/>&flightAdjustInfoId=<c:out value="${flightAdjustInfoId}"/>";
  document.forms[0].submit();
} 
	
</script>
</html> 